XcodeKit

RSS for tag

Create extensions to add commands to the Xcode source editor.

Posts under XcodeKit tag

30 Posts

Post

Replies

Boosts

Views

Activity

Xcode Extension isn't show up in the Editor menu
https://developer.apple.com/documentation/xcodekit/creating_a_source_editor_extension I created new MacOS project and added a Xcode Source Editor Extension target to the project. I run the extension in debug mode with extension target, but the extension is not show up in Editor menu debug mode Xcode. Xcode version is 15.3(released) MacOS version is 14.4.1 Sonoma
6
0
2.3k
Mar ’25
Uncategorized (Xcode): Unable to find a destination matching the provided destination specifier: { id:45967BD9-44E0-4D5D-8C43-C5437F48836A }
Hello I am using 26.2 (25C56) on my m4 air. when I am working on a Flutter project suddenly my app crashed and after when I tried to build the application again this error occurs. How to fix it. ? Launching lib/main.dart on iPhone 16e in debug mode... Xcode build done. 2.4s Failed to build iOS app Uncategorized (Xcode): Unable to find a destination matching the provided destination specifier: { id:45967BD9-44E0-4D5D-8C43-C5437F48836A }Available destinations for the "Runner" scheme: { platform:macOS, arch:arm64, variant:Designed for [iPad,iPhone], id:00008132-001E5102020B801C, name:My Mac } { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device } { platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device } Could not build the application for the simulator. Error launching application on iPhone 16e.
1
0
180
Jan ’26
XcodeKit module not found, but why?
I'm working on a plugin, and that target works just fine. I made another target so I can test some computation functions. It doesn't need much from XcodeKit, just some of the structures. I added XcodeKit and Cocoa, but the import XcodeKit just says "no such module". If I switch to the plugin target, it's just fine. I've compared both schemes, but I don't see difference which would affect finding the framework.
2
0
150
Apr ’25
The host app appears in Accessibility Permission
I'm learning XPC by inspecting the GitHub Copilot project. I figured out that the schema works as follows: The host app with a UI to manage settings A Service Extension that controls the Xcode Editor A communication bridge cli app that connects the first two As far as I understand an app appears in the Accessibility Permission when it calls the next method: let key = kAXTrustedCheckOptionPrompt.takeRetainedValue() as NSString AXIsProcessTrustedWithOptions([key: true] as CFDictionary) This method is only called by the Service Extension. However, when I run a release build from the /Application folder (where launch agents point to), there are two records appearing in the Accessibility Permission list: The host app The needed Service Extension I compared all metadata files from Copilot with my copy line-by-line, but still can't figure out why the host app record appears in the Accessibility Permission, since the host app does not call the AXIsProcessTrustedWithOptions() method at all. Could you give me any clue to help me wrap my head around it?
2
0
175
Mar ’25
Unable to see source editor extension commands in Xcode 16
I am trying to create a source editor extension in Xcode 16, I just created a blank macOS project and added an extension target. I also changed "XcodeKit.framework" to Embed and sign, but when I run the extension on my Mac, I can't see the command under "Editor" menu. I even tried to clone a sample extension from online and run it, even in this project I'm unable to see the commands under "Editor" menu. Has anyone faced this issue?
4
1
381
Mar ’25
The source editor extension can't connect xpc service
I created a macOS app, added an XPC service target, and also added a source editor extension. in The source editor extension‘s perform function. It doesn't work - (void)performCommandWithInvocation:(XCSourceEditorCommandInvocation *)invocation completionHandler:(void (^)(NSError * _Nullable nilOrError))completionHandler { self.xpcConnect = [[NSXPCConnection alloc] initWithServiceName:@"test.TestNewXPCApp.NewXPC"]; NSXPCInterface *interface = [NSXPCInterface interfaceWithProtocol:@protocol(NewXPCProtocol)]; self.xpcConnect.remoteObjectInterface = interface; [self.xpcConnect resume]; [[self.xpcConnect remoteObjectProxy] performCalculationWithNumber:@231 andNumber:@119 withReply:^(NSNumber *reply) { // We have received a response. NSLog(@"ui success%@", reply); }]; But In ViewControler.m, executing the same code , it can work. So why is it possible to connect to the XPC service from within the macOS app, but not from the source editor extension?
1
0
504
Nov ’24
Xcode Source Editor Extensions & Sandbox
Hi, I'm working on an Xcode Source Editor Extension. Currently, I have App Sandbox enabled and everything works as expected. I have some features I'd like to add that would require me to disable the App Sandbox and release the extension and containing app outside of the App Store. However, whenever I remove the App Sandbox capability from my project and re-run the extension, I can no longer see my extension appear in the Editor menu - it's just gone. My question is - are Xcode Source Editor Extensions only limited to sandboxed environments or can they operate out of the sandbox? If so, how come I don't see it in Xcode 15?
1
0
1.5k
Sep ’23
Xcode Extension accessing Current File and Xcode UI integration
For things like linters, formatting tools, and more: We need a good way to inject into the Xcode UI. Can I create a Warning or Error in the buffer/Issue Navigator? Is there an example of how to mark lines/columns with a message/error/warning? Get the current file path or URL object? How can I place a view onto the Xcode source canvas? Like a popover or interactive window.
1
0
833
Aug ’23
Command Line Tools for Xcode Update Problem
Hi, I am new person in here, I downloaded XCode (14.3) the latest version from the store. Then I installed homebrew . After this process, the software center says there are updates for Command Line Tools for Xcode(14.0, 14.2, 14.3). It installs the updates, but after the installation it gives the same warning again. I tried several times but nothing change. I did some research but didn't find a solution.
1
0
5.8k
Apr ’23
Problem with xCode 13.2.1
I have macOS Big Sur 11.7.5 and I had to download the version of xCode 13.2.1, which is compatible according to the Apple page. When I open xCode and choose "Open a project or file" it says "Could not open file." and the file path of your choice. I do not know what else to do! If I press the right button and open the simulator it lets me open it but when I try to build my React-Native app the xCode doesn't detect me Thanks for your help!! error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening ristoUserApp.xcworkspace.
1
0
1.4k
Apr ’23
Apple Swift version 5.7 not working on Apple Swift version 5.6.1
We have built a binary framework created with Xcode 14.1 using Xcode 13.4.1 getting below error. BUILD_LIBRARY_FOR_DISTRIBUTION ENABLED TRUE. this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51)', while this compiler is 'Apple Swift version 5.6.1 (swiftlang-5.6.0.323.66 clang-1316.0.20.12)'). Please select a toolchain that matches the SDK.
2
0
5.6k
Nov ’22
Xcode Extensions in Xcode 14?
I noticed an Xcode Extension I wrote a couple of years ago isn't showing up in the Editor menu of Xcode. So I opened up the project, ran the Extension and the grayed out version of Xcode shows up but my extension no longer appears in the "Editor" menu. So I just tried to create a brand new Xcode project, with an Xcode extension. Right out of the box, no code changes from the template, and I can't get the new project's Xcode extension to appear in the "Editor menu". In System Preferences the app is checked off under "Xcode Extensions" but still nowhere to be found?
1
0
3.2k
Oct ’22
Distributed Xcode Source Editor Extension not appearing in editor menu
I have built an XcodeSourceEditorExtension which I can: Run locally from xcode (launching greyed out xcode etc) Archive successfully Upload/Distribute to TestFlight Download and launch the application from TestFlight See the app and extension in System Preferences>Extensions>(Added Extensions|Xcode Source Editor) I have checked the boxes but the extension never appears in the Xcode>Editor menu. Have tried all "fixes" I have read about, including re-installing xcode. However, nothing seems to work. All TestFlight testers have the same issue. Have also run the following terminal commands: pluginkit -m -p com.apple.dt.Xcode.extension.source-editor pluginkit -m -p com.apple.dt.Xcode.extension.source-editor -A -D -vvv which generates the following output: + com.cheekyghost.<appName>.XcodeExtension(1.0) + com.cheekyghost.<appName>.XcodeExtension(1.0) Path = /Applications/<appName>app/Contents/PlugIns/<appName>Extension.appex UUID = ********-****-****-****-************ Timestamp = 2022-07-26 10:40:39 +0000 SDK = com.apple.dt.Xcode.extension.source-editor Parent Bundle = /Applications/<appName>.app Display Name = <appName> Extension Short Name = <appName>Extension Parent Name = <appName> (1 plug-in) I feel like I'm missing something but can't for the life of me see what. Has anyone else run into this issue while distributing an Xcode source extension?
6
0
2.6k
Aug ’22
Xcode Command line tools present but not showing installed
Hey guys , I am new to mac I just downloaded the command line tools 12.4 from the apple developer site it was in .dmg file because xcode-select --install was getting stuck at "finding software". I had put that in my Xcode developer folder but when I run xcode-select -p its not showing the path /Applications/Xcode.app/Contents/Developer or if i run xcode-select --install it asks to install command line(gets stuck on finding software. What should I do , I am new to mac I have no idea , can not find anything on youtube which is helpful.
1
0
2k
Feb ’22
Xcode Extension isn't show up in the Editor menu
https://developer.apple.com/documentation/xcodekit/creating_a_source_editor_extension I created new MacOS project and added a Xcode Source Editor Extension target to the project. I run the extension in debug mode with extension target, but the extension is not show up in Editor menu debug mode Xcode. Xcode version is 15.3(released) MacOS version is 14.4.1 Sonoma
Replies
6
Boosts
0
Views
2.3k
Activity
Mar ’25
Uncategorized (Xcode): Unable to find a destination matching the provided destination specifier: { id:45967BD9-44E0-4D5D-8C43-C5437F48836A }
Hello I am using 26.2 (25C56) on my m4 air. when I am working on a Flutter project suddenly my app crashed and after when I tried to build the application again this error occurs. How to fix it. ? Launching lib/main.dart on iPhone 16e in debug mode... Xcode build done. 2.4s Failed to build iOS app Uncategorized (Xcode): Unable to find a destination matching the provided destination specifier: { id:45967BD9-44E0-4D5D-8C43-C5437F48836A }Available destinations for the "Runner" scheme: { platform:macOS, arch:arm64, variant:Designed for [iPad,iPhone], id:00008132-001E5102020B801C, name:My Mac } { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device } { platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device } Could not build the application for the simulator. Error launching application on iPhone 16e.
Replies
1
Boosts
0
Views
180
Activity
Jan ’26
XcodeKit module not found, but why?
I'm working on a plugin, and that target works just fine. I made another target so I can test some computation functions. It doesn't need much from XcodeKit, just some of the structures. I added XcodeKit and Cocoa, but the import XcodeKit just says "no such module". If I switch to the plugin target, it's just fine. I've compared both schemes, but I don't see difference which would affect finding the framework.
Replies
2
Boosts
0
Views
150
Activity
Apr ’25
The host app appears in Accessibility Permission
I'm learning XPC by inspecting the GitHub Copilot project. I figured out that the schema works as follows: The host app with a UI to manage settings A Service Extension that controls the Xcode Editor A communication bridge cli app that connects the first two As far as I understand an app appears in the Accessibility Permission when it calls the next method: let key = kAXTrustedCheckOptionPrompt.takeRetainedValue() as NSString AXIsProcessTrustedWithOptions([key: true] as CFDictionary) This method is only called by the Service Extension. However, when I run a release build from the /Application folder (where launch agents point to), there are two records appearing in the Accessibility Permission list: The host app The needed Service Extension I compared all metadata files from Copilot with my copy line-by-line, but still can't figure out why the host app record appears in the Accessibility Permission, since the host app does not call the AXIsProcessTrustedWithOptions() method at all. Could you give me any clue to help me wrap my head around it?
Replies
2
Boosts
0
Views
175
Activity
Mar ’25
Unable to see source editor extension commands in Xcode 16
I am trying to create a source editor extension in Xcode 16, I just created a blank macOS project and added an extension target. I also changed "XcodeKit.framework" to Embed and sign, but when I run the extension on my Mac, I can't see the command under "Editor" menu. I even tried to clone a sample extension from online and run it, even in this project I'm unable to see the commands under "Editor" menu. Has anyone faced this issue?
Replies
4
Boosts
1
Views
381
Activity
Mar ’25
The source editor extension can't connect xpc service
I created a macOS app, added an XPC service target, and also added a source editor extension. in The source editor extension‘s perform function. It doesn't work - (void)performCommandWithInvocation:(XCSourceEditorCommandInvocation *)invocation completionHandler:(void (^)(NSError * _Nullable nilOrError))completionHandler { self.xpcConnect = [[NSXPCConnection alloc] initWithServiceName:@"test.TestNewXPCApp.NewXPC"]; NSXPCInterface *interface = [NSXPCInterface interfaceWithProtocol:@protocol(NewXPCProtocol)]; self.xpcConnect.remoteObjectInterface = interface; [self.xpcConnect resume]; [[self.xpcConnect remoteObjectProxy] performCalculationWithNumber:@231 andNumber:@119 withReply:^(NSNumber *reply) { // We have received a response. NSLog(@"ui success%@", reply); }]; But In ViewControler.m, executing the same code , it can work. So why is it possible to connect to the XPC service from within the macOS app, but not from the source editor extension?
Replies
1
Boosts
0
Views
504
Activity
Nov ’24
Showing UI and Handling Click events using XPC Service
I want to build an Xcode Source Code Editor extension that triggers an XPC service shows a gui that can handle user interactions Is it possible in any way ? what are the alternatives to display the UI and allow the user to interact on it ?
Replies
1
Boosts
0
Views
895
Activity
Feb ’24
Xcode Source Editor Extensions & Sandbox
Hi, I'm working on an Xcode Source Editor Extension. Currently, I have App Sandbox enabled and everything works as expected. I have some features I'd like to add that would require me to disable the App Sandbox and release the extension and containing app outside of the App Store. However, whenever I remove the App Sandbox capability from my project and re-run the extension, I can no longer see my extension appear in the Editor menu - it's just gone. My question is - are Xcode Source Editor Extensions only limited to sandboxed environments or can they operate out of the sandbox? If so, how come I don't see it in Xcode 15?
Replies
1
Boosts
0
Views
1.5k
Activity
Sep ’23
Xcode Extension accessing Current File and Xcode UI integration
For things like linters, formatting tools, and more: We need a good way to inject into the Xcode UI. Can I create a Warning or Error in the buffer/Issue Navigator? Is there an example of how to mark lines/columns with a message/error/warning? Get the current file path or URL object? How can I place a view onto the Xcode source canvas? Like a popover or interactive window.
Replies
1
Boosts
0
Views
833
Activity
Aug ’23
Command Line Tools for Xcode Update Problem
Hi, I am new person in here, I downloaded XCode (14.3) the latest version from the store. Then I installed homebrew . After this process, the software center says there are updates for Command Line Tools for Xcode(14.0, 14.2, 14.3). It installs the updates, but after the installation it gives the same warning again. I tried several times but nothing change. I did some research but didn't find a solution.
Replies
1
Boosts
0
Views
5.8k
Activity
Apr ’23
Problem with xCode 13.2.1
I have macOS Big Sur 11.7.5 and I had to download the version of xCode 13.2.1, which is compatible according to the Apple page. When I open xCode and choose "Open a project or file" it says "Could not open file." and the file path of your choice. I do not know what else to do! If I press the right button and open the simulator it lets me open it but when I try to build my React-Native app the xCode doesn't detect me Thanks for your help!! error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening ristoUserApp.xcworkspace.
Replies
1
Boosts
0
Views
1.4k
Activity
Apr ’23
Apple Swift version 5.7 not working on Apple Swift version 5.6.1
We have built a binary framework created with Xcode 14.1 using Xcode 13.4.1 getting below error. BUILD_LIBRARY_FOR_DISTRIBUTION ENABLED TRUE. this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51)', while this compiler is 'Apple Swift version 5.6.1 (swiftlang-5.6.0.323.66 clang-1316.0.20.12)'). Please select a toolchain that matches the SDK.
Replies
2
Boosts
0
Views
5.6k
Activity
Nov ’22
Xcode 12.3 no longer shows Souce Editor Extensions?
Brand new installation of MacOS Big Sur 11.1. Brand new installation of Xcode 12.3. Installed xcsort, installed Soothe (both from the App Store), full disclosure, I'm the author of Soothe and trying to push an update, but can't see the editor commands anymore. Is this a known issue? any workarounds?
Replies
2
Boosts
0
Views
1.9k
Activity
Oct ’22
Xcode Extensions in Xcode 14?
I noticed an Xcode Extension I wrote a couple of years ago isn't showing up in the Editor menu of Xcode. So I opened up the project, ran the Extension and the grayed out version of Xcode shows up but my extension no longer appears in the "Editor" menu. So I just tried to create a brand new Xcode project, with an Xcode extension. Right out of the box, no code changes from the template, and I can't get the new project's Xcode extension to appear in the "Editor menu". In System Preferences the app is checked off under "Xcode Extensions" but still nowhere to be found?
Replies
1
Boosts
0
Views
3.2k
Activity
Oct ’22
Distributed Xcode Source Editor Extension not appearing in editor menu
I have built an XcodeSourceEditorExtension which I can: Run locally from xcode (launching greyed out xcode etc) Archive successfully Upload/Distribute to TestFlight Download and launch the application from TestFlight See the app and extension in System Preferences>Extensions>(Added Extensions|Xcode Source Editor) I have checked the boxes but the extension never appears in the Xcode>Editor menu. Have tried all "fixes" I have read about, including re-installing xcode. However, nothing seems to work. All TestFlight testers have the same issue. Have also run the following terminal commands: pluginkit -m -p com.apple.dt.Xcode.extension.source-editor pluginkit -m -p com.apple.dt.Xcode.extension.source-editor -A -D -vvv which generates the following output: + com.cheekyghost.<appName>.XcodeExtension(1.0) + com.cheekyghost.<appName>.XcodeExtension(1.0) Path = /Applications/<appName>app/Contents/PlugIns/<appName>Extension.appex UUID = ********-****-****-****-************ Timestamp = 2022-07-26 10:40:39 +0000 SDK = com.apple.dt.Xcode.extension.source-editor Parent Bundle = /Applications/<appName>.app Display Name = <appName> Extension Short Name = <appName>Extension Parent Name = <appName> (1 plug-in) I feel like I'm missing something but can't for the life of me see what. Has anyone else run into this issue while distributing an Xcode source extension?
Replies
6
Boosts
0
Views
2.6k
Activity
Aug ’22
Apple 10 every 7 days
the error will go away after new 7 days?
Replies
2
Boosts
0
Views
1.2k
Activity
May ’22
iPhone isn't connecting to Xcode
I am new to Xcode. I have been trying connect my Xcode to my iPhone , for testing my app but I am having trouble with it. The screen keeps on blinking with the message ' iPhone is busy, Xcode is waiting for iPhone to finish'
Replies
1
Boosts
1
Views
2k
Activity
Apr ’22
running ui script as part of instrumenting ios app
I am using xctrace record to instrument my ios app, but in previous instruments there is a way to attach ui script to run along with app, to perform different operations on the app using UIASCRIPT options. What is the equivalent here
Replies
0
Boosts
0
Views
725
Activity
Apr ’22
Can't Add Another Page to XCODE storyboard
Hello, I am a new developer and I am getting adjusted to Xcode storyboard and I haven't bean able to find a option to add another page. if anyone knows how to do this. Thanks, Andrew
Replies
2
Boosts
0
Views
1.7k
Activity
Mar ’22
Xcode Command line tools present but not showing installed
Hey guys , I am new to mac I just downloaded the command line tools 12.4 from the apple developer site it was in .dmg file because xcode-select --install was getting stuck at "finding software". I had put that in my Xcode developer folder but when I run xcode-select -p its not showing the path /Applications/Xcode.app/Contents/Developer or if i run xcode-select --install it asks to install command line(gets stuck on finding software. What should I do , I am new to mac I have no idea , can not find anything on youtube which is helpful.
Replies
1
Boosts
0
Views
2k
Activity
Feb ’22